package com.ft.oa.web.presalesController;

import com.ft.oa.domain.dto.ApiResult;
import com.ft.oa.domain.technology.TechnologyDoc;
import com.ft.oa.mapper.technologyMapper.ItechnologyDocMapp;
import com.ft.oa.service.technologyService.ItechnologyDocService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/technologyrecord")
public class TechnologyDocController {
    @Autowired
    private ItechnologyDocService itechnologyDocService;
    /**
     * 获取技术领域详情
     * @return
     */
    @GetMapping("/recordList")
        private ApiResult recordList(@RequestParam String industryId, String lvalueid, String lfileName, int page, int size){
        return ApiResult.successWithData(itechnologyDocService.recordList(industryId,lvalueid,lfileName,page,size));
    }
    /**
     * 新增技术领域详情
     */
    @PostMapping("/addTechnicaldetails")
    private ApiResult addTechnicaldetails(@RequestBody TechnologyDoc itechnologyDoc){
        return ApiResult.successWithData(itechnologyDocService.addTechnicaldetails(itechnologyDoc));
    }
    /**
     * 删除技术领域详情
     */
    @GetMapping("/dellTechnicaldatails")
    private ApiResult dellTechnicaldatails(@RequestParam int technologyId){
        return ApiResult.successWithData(itechnologyDocService.dellTechnicaldatails(technologyId));
    }
    /**
     * 修改技术领域详情
     */
    @PostMapping("/updataTachnicaldetails")
    private ApiResult updataTachnicaldetails(@RequestBody TechnologyDoc itechnologyDoc){
        return ApiResult.successWithData(itechnologyDocService.updataTachnicaldetails(itechnologyDoc));
    }
}
